import org.junit.Test;

/**
 * Created by andy on 2016/11/1.
 */
public class hhh {

   @Test
    public  void  testTread(){
       Thread thread=new Thread(){
           @Override
           public void run(){
               while (true){
                   //500m秒   每隔5秒休息
                   try {
                       Thread.sleep(500);
                   } catch (InterruptedException e) {
                       e.printStackTrace();
                   }
                   System.out.print("1");
                 //  System.out.print("2"+this.getName());
               }
           }
       };
       thread.start();
   }
}
